// 导入axios实例
import httpRequest from "../axios";
//增加Form
interface Form {
    secretTitle:string;
    secretCon:string;
    secretNumber:number;
}
//修改Form
interface Form2 {
    id: number;
    secretTitle:string;
    secretCon:string;
    secretNumber:number;
}
//查询全部
export function allGet() {
    return httpRequest({
        url: "/index2/get/index2Secret",
        method: "get",
    });
}

//根据id查询单个
export function getOne(id) {
    return httpRequest({
        url: "/index2/get/index2Secret/" + id,
        method: "get",
    });
}

//增加一个
export function AddG(param: Form) {
    return httpRequest({
        url: "/index2/post/addSecret",
        method: "post",
        data: param,
    });
}
//删除一个
export function DeleteG(id) {
    return httpRequest({
        url: "/index2/get/deleteSecret/" + id,
        method: "get",
    });
}
//修改一个
export function EditG(param: Form2) {
    return httpRequest({
        url: "/index2/post/editSecret",
        method: "post",
        data: param,
    });
}
